<div id="main_wrap">
    <div class="center_wrap clearfix">
		<div id="channel_brand"></div>
        
		<div id="channel" class="clearfix">
        	{insert name=get_member_profilepicture assign=profilepicture value=var USERID=$profilearray[0].USERID}
			<img class="channel_img" src="{$membersprofilepicurl}/{$profilepicture}" width="200" />
  			<div class="channel_info">
    			<h3 class="no_bottom">{$profilearray[0].username}'s {$lang26}</h3>
                <p>{$lang112}: {$profilearray[0].firstname}&nbsp;{$profilearray[0].lastname}</p>
                <p>{$lang130}: {if $profilearray[0].birthday ne "0000-00-00"}{$profilearray[0].birthday|date_format}{/if}</p>
                <p>{$lang134}: {if $profilearray[0].gender eq "1"}Male{elseif $profilearray[0].gender eq "0"}Female{/if}</p>
                <p>{$lang140}: {$profilearray[0].city}</p>
                <p>{$lang139}: {$profilearray[0].country}</p>
                <p>{$lang113}: {insert name=get_stripped_phrase value=a assign=pdesc details=$profilearray[0].description}{$pdesc}</p>
                <p>{$lang259}: <a href="{$profilearray[0].url}" target="_blank">{$profilearray[0].url}</a></p>
                <p>{$lang260}: {insert name=get_time_to_days_ago value=var time=$profilearray[0].lastlogin}</p>
                <p>{$lang261}: {insert name=get_time_to_days_ago value=var time=$profilearray[0].addtime}</p>
                <p>{$lang262}: <input readonly="readonly" value="{$baseurl}/{$profilearray[0].username}" id="permaSelect" style="width:250px;" /></p>
			</div>
  			<div id="channel_meta">
                {if $smarty.session.USERID ne ""}
            
                {if $smarty.session.USERID eq $profilearray[0].USERID}
                <a href="#">{$lang289}</a>
                {else}
                {insert name=get_subscribed_status assign=issubscribed value=var USERID=$profilearray[0].USERID}
                {if $issubscribed eq "false"}
                <div id="subscribe">
                    <button id="subscribepublisher" onClick="fxSubscribe('subscribe',{$smarty.session.USERID},{$profilearray[0].USERID})">{$lang290}</button>							
                </div>
                <div id="subscribeSuccess" style="display:none;">
                    <a href="#">{$lang291}</a>
                </div>
                <div id="subscribeFailure" style="display:none;">
                    <a href="#">{$lang292}</a>
                </div>
                {else}
                <a href="#">{$lang293}</a>							
                {/if}
                {/if}
                
                {else}
                <form action="http://audio.isoftscripts.com/login.php" method="get"><button id="subscribepublisher" type="submit">{$lang290}</button></form>
                {/if}
            
				<p class="meta">
      				<span class="metaLabelP">{$lang295}: </span>
                    <varP>{$profilearray[0].profileviews}</var><br />
                    <span class="metaLabelP">{$lang800}: </span>
                    <varP>{insert name=get_member_audios_count value=var USERID=$profilearray[0].USERID}</var><br />
                    <span class="metaLabelP">{$lang799}: </span>
                    <varP>{insert name=get_member_favorited_count_audios value=var USERID=$profilearray[0].USERID}</var><br />
                    <span class="metaLabelP">{$lang254}: </span>
                    <varP>{insert name=get_profile_commentcount assign=commentcount userid=$profilearray[0].USERID}{$commentcount}</var><br />
                    <span class="metaLabelP">{$lang207}: </span>
                    <varP>{insert name=get_member_subscribers_count value=var USERID=$profilearray[0].USERID}</var><br />
                    <span class="metaLabelP">{$lang280}: </span>
                    <varP>{insert name=get_member_subscribedto_count value=var USERID=$profilearray[0].USERID}</var><br />
    			</p>    
  			</div>
			<div class="clear"></div>
		</div>
        
        <p>
        		{if $smarty.session.USERID ne ""}
                	{if $smarty.session.USERID eq $profilearray[0].USERID}
                    	{$lang263}
                    {else}
        				<a href="#sendmessagelink" id="sendmessageto" onclick="showMe('sendmessageContainer');">{$lang264}</a>
                    {/if}
                {else}
    				<a href="{$baseurl}/login.php" id="sendmessageto">{$lang264}</a>								
            	{/if}
                
                &nbsp;&nbsp;&nbsp;
                                
            	{if $smarty.session.USERID ne ""}
                	{if $smarty.session.USERID eq $profilearray[0].USERID}
                    	{$lang263}
                    {else}
                    	{insert name=get_friends_status assign=isfriend value=var USERID=$profilearray[0].USERID}
            			{if $isfriend eq "false"}
        					<a href="#addtofriendslink" id="addtofriends" onclick="showMe('addtofriendsContainer');">{$lang265}</a>
                        {else}
                        	{$lang266}
                        {/if}
                    {/if}
                {else}
    				<a href="{$baseurl}/login.php" id="addtofriends">{$lang265}</a>								
            	{/if}
        </p>
        
        
        {if $smarty.session.USERID ne "" && $smarty.session.USERID ne $profilearray[0].USERID}
    
        <!-- Send Message Begin -->
        <div class="containerD home_sideC" id="sendmessageContainer" align="left" style="display:none;">
            <h2>{$lang264}</h2>
                <div>
                    <center>
                    <div id="sendmessagediv" style="width:90%; padding-top:10px; padding-bottom:10px;" align="left">
                        <script type="text/javascript" src="{$baseurl}/js/charcount.js"></script>
                        <form name="sendmessageform" method="POST" action="#">
                        <b>{$lang267}:</b><br />
                        <textarea name="sendmessagesubject" id="sendmessagesubject" rows="1" cols="60"></textarea><br />
                        <div style="padding-top:10px"></div>
                        <b>{$lang268}:</b><br />
                        <textarea name="sendmessagetext" id="sendmessagetext" rows="3" cols="60" onblur="textrem(this,this.form.rem, '{$max_com_msg}');" onkeyup="textrem(this,this.form.rem, '{$max_com_msg}');" onkeydown="textrem(this,this.form.rem, '{$max_com_msg}');" ></textarea><br />
                        <input class="submitButton" type="button" name="submitsendmessage" value="{$lang264}" onclick="fxSendMessage('sendmessagediv','sendmessagesubject','sendmessagetext',{$smarty.session.USERID},{$profilearray[0].USERID})">
                        <br /><input type="text" name="rem" style="width:30px" maxlength="4" size="4" value="{$max_com_msg}" onblur="textrem(this.form.addcomment, this, '{$max_com_msg}');" readonly />&nbsp;{$lang787}
                        </form>
                    </div>
                    <div align="center" id="sendmessagesuccess" style="display:none;width:90%; padding-top:10px; padding-bottom:10px;"><div class="showSuccess"><b>{$lang269}</b></div></DIV>
                    <div align="center" id="sendmessagefailure" style="display:none;width:90%; padding-top:10px; padding-bottom:10px;"><div class="showError"><b>{$lang270}</b></div></DIV>
                    <div align="center" id="msubjectfailure" style="display:none;width:90%; padding-top:10px; padding-bottom:10px;"><div class="showError"><b>{$lang271}</b></div></DIV>
                    <div align="center" id="mtextfailure" style="display:none;width:90%; padding-top:10px; padding-bottom:10px;"><div class="showError"><b>{$lang272}</b></div></DIV>
                    </center>
                </div>
                <div align="center"><a href="#closesendmessage" name="Send_Message_Close" onclick="hideMe('sendmessageContainer');">[{$lang273}]</a></div>
                <br />
        </div>
        <!-- Send Message End -->
        
        {/if}
        
        {if $smarty.session.USERID ne "" && $smarty.session.USERID ne $profilearray[0].USERID}
        
        <!-- Friend Request Begin -->
        <div class="containerD home_sideC" id="addtofriendsContainer" align="left" style="display:none;">
            <h2>{$lang274}</h2>
                <div>
                    <center>
                    <div id="addtofriendsdiv" style="width:90%; padding-top:10px; padding-bottom:10px;" align="left">
                        <b>{$lang275}:</b> {$profilearray[0].username}
                        <div style="padding-top:10px"></div>
                        <form name="addtofriendsform" method="POST" action="#">
                        <b>{$lang268}:</b><br />
                        <textarea name="addtofriendsmessage" id="addtofriendsmessage" rows="3" cols="60"></textarea><br />
                        <input class="submitButton" type="button" name="submitfriendrequest" value="{$lang274}" onclick="fxAddToFriends('addtofriendsdiv','addtofriendsmessage',{$smarty.session.USERID},{$profilearray[0].USERID})">
                        </form>
                    </div>
                    <div align="center" id="addtofriendssuccess" style="display:none;width:90%; padding-top:10px; padding-bottom:10px;"><div class="showSuccess"><b>{$lang276}</b></div></DIV>
                    <div align="center" id="addtofriendsfailure" style="display:none;width:90%; padding-top:10px; padding-bottom:10px;"><div class="showError"><b>{$lang277}</b></div></DIV>
                    <div align="center" id="addtofriendsexists" style="display:none;width:90%; padding-top:10px; padding-bottom:10px;"><div class="showError"><b>{$lang278}</b></div></DIV>
                    </center>
                </div>
                <div align="center"><a href="#closefriendrequest" name="Friend_Request_Close" onclick="hideMe('addtofriendsContainer');">[{$lang279}]</a></div>
                <br />
        </div>
        <!-- Friend Request End -->
        
        {/if}   

		<div id="channel_left" class="left">
  			<div class="module_wrap">
    			<h3>{$lang796} ({insert name=get_member_audios_count value=var USERID=$profilearray[0].USERID})</h3>
    			<div class="module_body clearfix">
                    <!-- LOOP START -->
                    {section name=i loop=$listprofileaudios}
        			<div class="search_box_grid">
                        <div class="aud_cont">
                            <span class="channel_thumb">
                                <a href="{$baseurl}/audios/{$listprofileaudios[i].AUDIOID}/{insert name=get_seotitle_from_audioid assign=title audioid=$listprofileaudios[i].AUDIOID}">
								{capture assign='player'}images/audiothumbs/{$listprofileaudios[i].AUDIOID}-1{$listprofileaudios[i].ext}{/capture} 
								{if $player|file_exists}
									<img alt="{$listprofileaudios[i].title|stripslashes}" src="{$athumburl}/{$listprofileaudios[i].AUDIOID}-1{$listprofileaudios[i].ext}" />
								{else}
									<img alt="{$listprofileaudios[i].title|stripslashes}" src="{$athumburl}/default.png" />
								{/if}
								{*<img alt="{$listprofileaudios[i].title|stripslashes}" src="{$athumburl}/{$listprofileaudios[i].AUDIOID}-1{$listprofileaudios[i].ext}" />*}
								</a>
                            </span>
                        </div>
          				<p class="blue"><a href="{$baseurl}/audios/{$listprofileaudios[i].AUDIOID}/{insert name=get_seotitle_from_audioid assign=title audioid=$listprofileaudios[i].AUDIOID}" title="{$listprofileaudios[i].title|stripslashes}">{$listprofileaudios[i].title|stripslashes}</a></p>
        			</div>
					
                    {if $smarty.section.i.iteration mod 4 eq 0}
        			<div class="clear"></div>
                    {/if}
                    {/section}
                    <!-- LOOP END -->
      
    			</div>
  			</div>
  		</div>

  		<div class="right side_300">
    		<p class="no_top">
            	{insert name=get_advertisement value=var AID="1"}
            </p>
		</div>
  		<div class="clear"></div>
	</div>

    <div class="clear"></div>
</div>